package com.yb.xczx.cloud.passport.feign.client;

import com.yb.core.model.XczxResult;
import com.yb.xczx.cloud.passport.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Copyright (C), 2022-2023, 姚兵
 * Author: 32210
 * Date: 2023/5/19 15:44
 * FileName: AuthClient
 * Description:
 */

@FeignClient(name = "xczx-cloud-auth-console",contextId = "auth-auth",configuration = FeignConfig.class)

public interface AuthBasicClient {

    @PostMapping("/login")
    public XczxResult login(@RequestParam String username, @RequestParam String password);



    @PostMapping("/oauth2/token")
    String getToken(@RequestParam String code, @RequestParam String grant_type, @RequestParam String redirect_uri, @RequestParam String scope, @RequestParam String access_token);
}
